Merge "Support multi-content diffs on Special:Undelete"
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index f8703cd..6a01b0c 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 use MediaWiki\MediaWikiServices;
-use MediaWiki\Storage\RevisionRecord;
+use MediaWiki\Revision\RevisionRecord;
 use Wikimedia\Rdbms\IResultWrapper;
 
 /**
@@ -347,7 +347,13 @@ class SpecialUndelete extends SpecialPage {
                                );
                        }
                        $revs = $this->msg( 'undeleterevisions' )->numParams( $row->count )->parse();
-                       $out->addHTML( "<li class='undeleteResult'>{$item} ({$revs})</li>\n" );
+                       $out->addHTML(
+                               Html::rawElement(
+                                       'li',
+                                       [ 'class' => 'undeleteResult' ],
+                                       "{$item} ({$revs})"
+                               )
+                       );
                }
                $result->free();
                $out->addHTML( "</ul>\n" );
@@ -443,8 +449,12 @@ class SpecialUndelete extends SpecialPage {
                        }
                }
 
-               $out->addHTML( $this->msg( 'undelete-revision' )->rawParams( $link )->params(
-                       $time )->rawParams( $userLink )->params( $d, $t )->parse() . '</div>' );
+               $out->addWikiMsg(
+                       'undelete-revision',
+                       Message::rawParam( $link ), $time,
+                       Message::rawParam( $userLink ), $d, $t
+               );
+               $out->addHtml( '</div>' );
 
                if ( !Hooks::run( 'UndeleteShowRevision', [ $this->mTargetObj, $rev ] ) ) {
                        return;
@@ -1163,7 +1173,7 @@ class SpecialUndelete extends SpecialPage {
                        }
 
                        $link = $this->getLinkRenderer()->makeKnownLink( $this->mTargetObj );
-                       $out->addHTML( $this->msg( 'undeletedpage' )->rawParams( $link )->parse() );
+                       $out->addWikiMsg( 'undeletedpage', Message::rawParam( $link ) );
                } else {
                        $out->setPageTitle( $this->msg( 'undelete-error' ) );
                }
@@ -1171,7 +1181,9 @@ class SpecialUndelete extends SpecialPage {
                // Show revision undeletion warnings and errors
                $status = $archive->getRevisionStatus();
                if ( $status && !$status->isGood() ) {
-                       $out->addWikiText( '<div class="error" id="mw-error-cannotundelete">' .
+                       $out->wrapWikiTextAsInterface(
+                               'error',
+                               '<div id="mw-error-cannotundelete">' .
                                $status->getWikiText(
                                        'cannotundelete',
                                        'cannotundelete'
@@ -1182,11 +1194,12 @@ class SpecialUndelete extends SpecialPage {
                // Show file undeletion warnings and errors
                $status = $archive->getFileStatus();
                if ( $status && !$status->isGood() ) {
-                       $out->addWikiText( '<div class="error">' .
+                       $out->wrapWikiTextAsInterface(
+                               'error',
                                $status->getWikiText(
                                        'undelete-error-short',
                                        'undelete-error-long'
-                               ) . '</div>'
+                               )
                        );
                }
        }